<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="Content-Script-Type" content="text/javascript" />
		<meta http-equiv="Content-Style-Type" content="text/css" />
		<meta http-equiv="keywords" content="" />
		<meta http-equiv="description" content="" />
		<title>工房受注管理</title>

		<link rel="stylesheet" href="./assets/styles/default.css" type="text/css" />
		<script src="assets/scripts/jquery-1.3.2.min.js" type="text/javascript"></script>
		<script src="assets/scripts/menu.js" type="text/javascript"></script>
		
		<script type="text/javascript">
		$(function() {

			// メッセージのフェード
			$('.message').fadeIn("slow");

			// 戻るボタン押下
			$('#btn_back').click(function(){
				document.fm.mode.value = 'back';
				document.fm.submit();
			});
		});
		</script>
		<script type="text/javascript">
			function openYZ(){
				var mydiv = document.getElementById('mydiv');
				mydiv.style.display = 'block';
				window.location.href = 'price_book.php?mode=open';
			}
		</script>	
				
	</head>
	<body id="">

		<div style="height: 20px" >
		
		</div>

		<div id="container"><div class="wrapper">
			
			  <div id="printContent">
			   <div id="pheader">
			    <div id="pheaderLeft">
			    	<h1 id="printPageTitle">単価稟議書</h1>
			    	<p class="printName"><span>得意先名：</span>{{$order.name}}    {{if $order.comtype==1}}御中{{else}}様{{/if}}</p>
			    	<table>
			    		<tbody>
			    			<tr>
			    				<th>見積番号：</th>
			    				<td>{{$order.bookid}}</td>
			    			</tr>
			    			<tr>
			    				<th>支払条件：</th>
			    				<td>{{ if $order.pay_type == 1 }}事前振込み{{ /if }}
			    					{{ if $order.pay_type == 2 }}代金引換{{ /if }}
			    					{{ if $order.pay_type == 3 }}請求書払い{{ /if }}
			    					{{ if $order.pay_type == 4 }}現金払い{{ /if }}</td>
			    								</tr>
			    		</tbody>
			    	</table>
			    	<p class="rateText">掛け率：{{$order.discount}}　利益率：{{$profit}}</p>   
			    </div><!-- /#pheaderLeft-->
			    <div id="pheaderRight">
			    	<p class="alignRight">年月日：{{$order.bookdate}}<br />
			    	作成者：{{$maker}}</p>
			    	
			    	<dl  class="hLogo">
			    		<dt>
					    	{{ if $order.category == 1 }}<img src="assets/images/pic_01.png" />{{ /if }}
					    	{{ if $order.category == 2 }}<img src="assets/images/pic_02.png" />{{ /if }}
					    	{{ if $order.category == 3 }}<img src="assets/images/pic_03.png" />{{ /if }}
					    	{{ if $order.category == 4 }}<img src="assets/images/pic_04.png" />{{ /if }}
			    		</dt>
			    	</dl>
			    	
			    	<table class="stampTable">
			    		<thead>
			    			<tr>
			    				<td>承認</td>
			    				<td>発行者</td>
			    			</tr>
			    		</thead>
			    		<tbody>
			    			<tr>
			    				<td>
			    				
			    				</td>
			    				<td>
			    				{{if $forms.examiner>0}}
			    				<img src="yz.php?examiner={{$forms.examiner}}"></img>
			    				{{/if}}
			    				</td>
			    			</tr>
			    		</tbody>
			    	</table>
				</div><!-- /#pheaderRight-->
			</div><!-- /#pheader-->
			   
			<form name="fm" action="" method="post">
			
			   
						<table class="printTable">		
							<tr align="center">
								<!-- <th>NO.</th> -->
								<th>ブランド名/商品名</th>
								<th>サイズ</th>								
								<th>数量</th>
								<th>単位</th>	
								<th>単価</th>	
								<th>金額</th>			
							</tr>
		{{ foreach from=$detail key=k item=v }}
							<tr align="center">
								<!-- <td>{{$k+1}}</td> -->
								<td class="itemName">{{$v.brand}}<br/>{{$v.shop_name}}</td>
								<td>{{$v.style}}</td>
								<td>{{$v.quantity}}</td>
								<td>{{$v.s_unit}}</td>
								<td>￥{{$v.refer_price}}</td>								
								<td>￥{{$v.money}}</td>								
							</tr>								
		{{ /foreach }}
		
		{{section name=foo start=$num loop=11 step=1 }}
		<tr align="center">
								<!-- <td>&nbsp;</td> -->
								<td>&nbsp;</td>
								<td></td>
								<td></td>
								<td></td>
								<td></td>								
								<td></td>								
		</tr>
		{{/section}}	
				</table>
				<table id="totalTable">
						<tbody>
							<tr><th>小計：</th><td>￥{{$m1}}</td></tr>
							<tr><th>お値引き：</th><td>▲￥{{$m2}}（掛け率：{{$order.discount}}）</td></tr>
							<tr><th>送料：</th><td>￥{{$m3}}</td></tr>
							<tr><th>消費税：</th><td>￥{{$m4}}</td></tr>
							<tr><th>合計：</th><td>￥{{$m5}}</td></tr>
						</tbody>
					</table>
				<div class="noteArea">
						<dl>
							<dt>[特価理由]</dt>
							<dd>{{$order.quote_special}}</dd>
						</dl>
				</div>
					
						<div style="clear: both;"></div>
					</form>	
			
		</div>
			  
		</div></div>
		
	</body>

</html>